<template>
  <div>
    <my-navbar></my-navbar>
    <!-- <h3 class="title">资讯页</h3> -->
    <div v-html="state.content"></div>
  </div>
</template>

<script setup>
import MyNavbar from "../components/MyNavbar.vue";
import { getNews } from "../api/newsApi";
import { reactive, onMounted } from "vue";
const state = reactive({
  content: null,
});

onMounted(async () => {
  const { data: res } = await getNews();
  // console.log(res.data.content);
  state.content = res.data.content;
});
</script>

<style>
.title {
  text-align: center;
  margin: 0;
  padding: 10px;
  background-color: #eee;
}
</style>
